Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Document the ClearlyDefined certifier #167

Merged
merged 1 commit into from
Oct 31, 2024

Conversation

Ritesh-Udgata
Copy link
Contributor

Closes #131

Copy link

netlify bot commented Oct 30, 2024

Deploy Preview for resonant-wisp-1a517a ready!

Name Link
🔨 Latest commit ae055bb
🔍 Latest deploy log https://app.netlify.com/sites/resonant-wisp-1a517a/deploys/6723db76f67d0d0008e579d3
😎 Deploy Preview https://deploy-preview-167--resonant-wisp-1a517a.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

Copy link
Collaborator

@funnelfiasco funnelfiasco left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a great start. Apart from the comments I left, there are two other things that I'd like to see:

  1. A link to the configuration guide, perhaps in the invocation section when talking about running automatically.
  2. A table of the supported command line arguments and what they mean. See PR Added OSV Certifier documentation for GUAC #165 for an example

@@ -0,0 +1,37 @@
## Documentation: GUAC Pull from ClearlyDefined
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's make a few changes here. First, you don't need to say "documentation" in the header because it's on the docs site already. Second, you can replace this line with something like the below so that it will render in the CI build:

---
layout: page
title: ClearlyDefined certifier
permalink: /certifier-clearlydefined/
---


### Overview

GUAC (Graph for Understanding Artifact Composition) integrates with **ClearlyDefined** to enhance supply chain transparency by retrieving accurate license data for software dependencies. This functionality helps organizations make informed decisions about software licenses when managing their dependencies.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Link to clearlydefined.io


This setup allows GUAC to remain flexible while keeping license data as accurate and complete as possible.

For further details and potential enhancements, such as batched query support, you can explore the [official GUAC documentation](https://docs.guac.sh) or related updates from the development team.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This site is the official docs. :-) Let's just remove this line.

GUAC integrates ClearlyDefined queries either by:
- **Scheduled certifier execution**: Automatically runs at set intervals to keep data current.
- **On-demand during SBOM ingestion**: Queries ClearlyDefined in real-time during dependency ingestion, with the trade-off of slower processing.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There's a third option: running guacone certifier cd from the command line

@Ritesh-Udgata
Copy link
Contributor Author

  1. Added link to configuration guide
  2. Added table of supported command line argument.
  3. Changed Title
  4. Link to clearlydefined.io
  5. Removed official doc link
  6. Added third option to integrate ClearlyDefined into Guac
  7. Formatted document using Prettier
  8. committed along with signoff and gpg-sign

3. **Manual Command Line Execution**
- Users can directly invoke the certifier using:
```bash
guacone certifier cd --input <path> --output <path> [options]
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The --input and --output arguments here are not supported by the guacone certifier command

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since I am not sure about alternatives as guacone certifier may have specific arguments for choosing between source types rather than directly setting files via --input and --output, I think I will remove the command and only keep the description.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The help content I included in another thread should give you the guidance you need here.


---

Below is a table of the supported **command-line arguments** for the **ClearlyDefined certifier**. These flags allow users to control input, output, and execution behavior.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Where did you get this list of arguments, because it does not match the output of guacone certifier cd --help?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

could you please provide the ouputs of guacone certifier cd --help.
I went through the blogs and code base of certifier but couldn't figure out a relevant change.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

bcotton@Bens-MacBook-Air ~/g/guac (main)> guacone certifier cd --help
runs the clearly defined certifier

Usage:
  guacone certifier cd [flags]

Flags:
      --certifier-batch-size int   sets the batch size for pagination query for the certifier (default 60000)
      --certifier-latency string   sets artificial latency on the certifier. Defaults to empty string (not enabled) but can set m, h, s...etc
  -h, --help                       help for cd
  -l, --last-scan int              hours since the last scan was run. If not set, run on all packages/sources (default 4)

Global Flags:
      --add-license-on-ingest   if enabled, the ingestor will query and ingest clearly defined for licenses. Warning: This will increase ingestion times
      --add-vuln-on-ingest      if enabled, the ingestor will query and ingest OSV for vulnerabilities. Warning: This will increase ingestion times
      --csub-addr string        address to connect to collect-sub service (default "localhost:2782")
      --csub-tls                enable tls connection to the server
      --csub-tls-skip-verify    skip verifying server certificate (for self-signed certificates for example)
      --gql-addr string         endpoint used to connect to graphQL server (default "http://localhost:8080/query")
      --header-file string      a text file containing HTTP headers to send to the GQL server, in RFC 822 format
  -i, --interval string         if polling set interval, m, h, s, etc. (default "5m")
  -p, --poll                    sets the collector or certifier to polling mode

@Ritesh-Udgata
Copy link
Contributor Author

DONE 👍

Copy link
Collaborator

@funnelfiasco funnelfiasco left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks!

Copy link
Collaborator

@funnelfiasco funnelfiasco left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I spoke too soon. Two things you need to do:

  1. Run prettier (see README.md) to fix the formatting
  2. Squash the commits into one.

Otherwise, it's good to go.

@Ritesh-Udgata
Copy link
Contributor Author

  1. Ran through Prettier. Came out exactly the same.
  2. Squashed all commits into the initial commit. Kept the commit message same as initial commit.
  3. Added sign off and gpg-key
  4. force pushed the branch

@funnelfiasco
Copy link
Collaborator

Ran through Prettier. Came out exactly the same.

It shouldn't have. Prettier will wrap lines at 80 characters if you use npx --yes prettier --write --prose-wrap always *.md, which is what the CI build (which just failed) does. Looking at your file, there are still several lines longer than 80 characters

Signed-off-by: Ritesh <udgataritesh2005@gmail.com>

update document after feedback

Signed-off-by: Ritesh <udgataritesh2005@gmail.com>

removed command for manual command line execution

Signed-off-by: Ritesh <udgataritesh2005@gmail.com>

prettier

Signed-off-by: Ritesh <udgataritesh2005@gmail.com>
@Ritesh-Udgata
Copy link
Contributor Author

  1. Used prettier command
  2. added sign off and gpg sign
  3. rebased again and squashed all commit
  4. forced push the branch

Copy link
Collaborator

@funnelfiasco funnelfiasco left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, thanks @Ritesh-Udgata!

@funnelfiasco funnelfiasco merged commit 836d65c into guacsec:main Oct 31, 2024
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Document the ClearlyDefined certifier
2 participants